﻿@model Project.Database.User
           
<fieldset>
    <legend>User</legend>

    <div class="display-label">UserName</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.UserName)
    </div>

    <div class="display-label">Email</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Email)
    </div>

   
         <div class="display-label">First Name</div>
        <div class="display-field">
        @Html.DisplayFor(model => model.Profile.FirstName)
        </div>
         <div class="display-label">Last Name</div>
        <div class="display-field">
        @Html.DisplayFor(model => model.Profile.LastName)
        </div>
</fieldset>
<fieldset>
        <legend>Blogs</legend>
        <div class="display-label">Blogs</div>
        <ul>
            @foreach (Project.Database.Blog blog in ViewBag.Blogs)
            { 
                <li>Name: @blog.Name</li>
                <li>URL: @blog.URL</li>
                <li>Keywords: @blog.Keywords</li>
                <li>Category: @blog.BlogCategory.Name</li>
                foreach (Project.Database.Advert ad in @blog.Adverts)
                { 
                    <li>Advert: @ad.Advertiser.BrandName</li>
                    <li>Clicks: @ad.Clicks</li>
                }
            }
        </ul>
    
        @Html.ActionLink("Add a blog", "AddBlog", "Blog")
</fieldset>